local jiushi = fk.CreateSkill {
  name = "mini__jiushi",
}

Fk:loadTranslationTable{
  ["mini__jiushi"] = "酒诗",
  [":mini__jiushi"] = "当你需使用【酒】时，你可以弃置一张♣手牌，视为使用一张【酒】。",

  ["#mini__jiushi"] = "酒诗：弃置一张♣手牌，视为使用【酒】",

  ["$mini__jiushi1"] = "置酒高殿上，亲友从我游。",
  ["$mini__jiushi2"] = "走马行酒醴，驱车布鱼肉。",
}

jiushi:addEffect("viewas", {
  anim_type = "support",
  pattern = "analeptic",
  filter_pattern = {
    min_num = 0,
    max_num = 0,
    pattern = "",
    subcards = {}
  },
  prompt = "#mini__jiushi",
  card_filter = function (self, player, to_select, selected, selected_targets)
    return #selected == 0 and Fk:getCardById(to_select).suit == Card.Club and
      not player:prohibitDiscard(to_select) and table.contains(player:getCardIds("h"), to_select)
  end,
  view_as = function(self, player, cards)
    if #cards ~= 1 then return end
    local card = Fk:cloneCard("analeptic")
    card.skillName = jiushi.name
    card:addFakeSubcards(cards)
    return card
  end,
  before_use = function(self, player, use)
    player.room:throwCard(use.card.fake_subcards, jiushi.name, player, player)
  end,
  enabled_at_response = function (self, player, response)
    return not player:isKongcheng() and not response
  end,
})

return jiushi